import Vue from 'vue'
import ElementUI from 'element-ui';
import VueRouter from 'vue-router'
import 'element-ui/lib/theme-chalk/index.css';
import routers from './router'
import App from './App.vue'
import pdfjs from 'pdfjs-dist'
import urls from './assets/url'
import axios from 'axios'
import store from "./vuex/store"
import VideoPlayer from 'vue-video-player'
import viewUi from 'view-design'
import 'view-design/dist/styles/iview.css';
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(pdfjs)
Vue.use(viewUi)
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.config.productionTip = false
Vue.prototype.urls = urls.urls;
Vue.prototype.axios = axios;

const router = new VueRouter({
  mode: "history",
  routes: routers
})

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
}).$mount('#app')
